package com.engine4cloud.tdf.admin.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

@Data
@Schema(description = "行政区划-请求对象")
public class AreaUpdateDTO implements Serializable {
    @Schema(description = "主键")
    @NotNull(message = "主键不能为空")
    private Long id;

    @Schema(description = "地区编码，地区编码必须和司法部的一致", example = "460000")
    private String code;

    @Schema(description = "地区名称", example = "海南省")
    @NotBlank(message = "地区名称不能为空")
    private String name;

    @Schema(description = "地区父编码-查询省,传’0‘即可", example = "00")
    @NotBlank(message = "地区父编码不能为空")
    private String pcode;

    @Schema(description = "地区级别,地区级别必须和司法部的一致；1-省，2-市，3-县", example = "3")
    @NotNull(message = "地区级别不能为空")
    private Integer lev;

    @Schema(description = "地区id，地区id必须和司法部的一致", example = "12456")
    @NotNull(message = "地区id不能为空")
    private Long areaId;
}
